// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MatchFormatExtensions.cs" company="Roman '4ux-nbIx' Novitsky">
//   Copyright (c) Roman '4ux-nbIx' Novitsky 2010
// </copyright>
// <summary>
//   Defines the MatchFormatExtensions type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MtgMC.DataModel
{
    #region Namespace Imports

    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;

    #endregion


    /// <summary>
    /// Defines <see cref="MatchFormat"/> class extension methods.
    /// </summary>
    public static class MatchFormatExtensions
    {
        #region Constants and Fields

        private static readonly List<MatchFormat> _matchFormatsList = new List<MatchFormat>
                                                                          {
                                                                              MatchFormat.Standard, 
                                                                              MatchFormat.Block, 
                                                                              MatchFormat.Extended, 
                                                                              MatchFormat.Vintage, 
                                                                              MatchFormat.Legacy, 
                                                                              MatchFormat.SealedDeck, 
                                                                              MatchFormat.BoosterDraft
                                                                          };

        #endregion


        #region Properties

        /// <summary>
        /// Gets the values list.
        /// </summary>
        /// <value>
        /// The values list.
        /// </value>
        public static IList<MatchFormat> ValuesList
        {
            get
            {
                return _matchFormatsList;
            }
        }

        #endregion


        #region Public Methods

        /// <summary>
        /// Determines whether the specified match format is limited.
        /// </summary>
        /// <param name="matchFormat">
        /// The match format.
        /// </param>
        /// <returns>
        /// <c>true</c> if the specified match format is limited; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsLimitedFormat(this MatchFormat matchFormat)
        {
            return matchFormat == MatchFormat.SealedDeck || matchFormat == MatchFormat.BoosterDraft;
        }

        #endregion
    }
}